<!-- 此tpl如使用script标签渲染，请遵循layui.laytpl语法，此页面，支持PHP语法-->
<script type="text/html" id="barDemo">
    {foreach name="right_buttons" key="key" item="vo"}
        {if !empty($vo.unity_title) && $vo.unity_title == '审核/查看'}
            {{#  if (d.status == 1) { }}
            <a class="{:getBtnClassTpl($vo.class,$vo.title)}" lay-event="{$vo.json}" >审核</a>
            {{#  } else { }}
            <a class="{:getBtnClassTpl($vo.class,$vo.title)}" lay-event="{$vo.json}">{$vo.title}</a>
            {{#  } }}
        {else}
            <a class="{:getBtnClassTpl($vo.class,$vo.title)}" lay-event="{$vo.json}">{$vo.title}</a>
        {/if}
    {/foreach}
</script>

<input type="hidden" id="update_url" value="{:url('update')}"/>

<!-- 开关状态栏 -->
{foreach name="switch_tool" item="vo"}
    <script type="text/html" id="{$vo.name}">
        <input type="checkbox" name="{$vo.name}" value="{{d.{$vo.pk}}}" lay-filter="status" lay-skin="switch" lay-val="{$vo.val}" lay-text="{$vo.text}" {{ d.{$vo.name}== {$vo.checked} ? 'checked' : '' }}>
    </script>
{/foreach}

<!-- 排序Bar -->
{foreach name="sort_tool" item="vo"}
    <script type="text/html" id="sort_{$vo.name}">
        <input type="text" data-key="{$vo.name}" data-id="{{d.{$vo.pk}}}" data-url="{$vo.url}" value="{{d.{$vo.name}}}" class="layui-input x-sort tableInput"/>
    </script>
{/foreach}

<script id="_userTpl" type="text/html">
    {{#  if (d.user) { }}
    {{d.user.code}} - {{d.user.nickname}} - {{d.user.mobile}}
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="_takeUserTpl" type="text/html">
    {{#  if (d.take) { }}
    {{d.take.code}} - {{d.take.nickname}} - {{d.take.mobile}}
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="_buyerTpl" type="text/html">
    {{#  if (d.buyer) { }}
    {{d.buyer.code}} - {{d.buyer.nickname}} - {{d.buyer.mobile}}
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="_sellerTpl" type="text/html">
    {{#  if (d.seller) { }}
    {{d.seller.code}} - {{d.seller.nickname}} - {{d.seller.mobile}}
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="imagesTpl" type="text/html">
    {{#  if (d.images) { }}
    <a href="javascript:;" class="openShowImg" data-value="{{d.images}}">点击查看</a>
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="imagesShow" type="text/html">
    <a href="javascript:;" class="openShowImg" data-value="{{d.images}}">
        <img lay-src="{{d.images}}" style="width: 50px;height: 50px;padding: 5px" class="lay-images"/>
    </a>
</script>

<script id="iconTpl" type="text/html">
    {{#  if (d.icon) { }}
    <a href="javascript:;" class="openShowImg" data-value="{{d.icon}}">点击查看</a>
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="iconShow" type="text/html">
    <a href="javascript:;" class="openShowImg" data-value="{{d.icon}}">
        <img lay-src="{{d.icon}}" style="width: 50px;height: 50px;padding: 5px" class="lay-images"/>
    </a>
</script>

<script id="videoTpl" type="text/html">
    {{#  if (d.video) { }}
    <a href="javascript:;" class="openVideo" data-value="{{d.video}}" style="color: #1890ff">点击预览</a>
    {{#  } else { }}
    -
    {{#  } }}
</script>

<script id="editorTpl" type="text/html">
    <a href="javascript:;" class="openEditor" data-value="{{d.content}}">点击预览</a>
</script>
